Skip to content

Conversation

@andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Mar 6, 2025

Proposed changes

Jira ticket: CLOUDP-304706

Description:

This pull request introduces a retry mechanism for handling failures in the release workflow. The most important changes include adding a new job to retry the release process and updating the failure handler to account for this new retry mechanism.

Retry mechanism for release workflow:

  • .github/workflows/release-spec.yml: Added a new retry-handler job that attempts to rerun the release workflow up to three times if it fails. Updated the failure-handler job to depend on the retry-handler and only run if the retry-handler is skipped.

  • .github/workflows/retry-handler.yml: Created a new workflow file to define the retry-handler job, which reruns the failed workflow using the GitHub CLI.

I tested the changes in my fork: https://github.com/andreaangiolillo/openapi-test/actions/runs/13703067837

Screenshot 2025-03-06 at 16 23 23

@andreaangiolillo andreaangiolillo marked this pull request as ready for review March 6, 2025 16:16
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner March 6, 2025 16:16
retry-handler:
needs: [ release, release-postman, release-changelog]
if: ${{ always() && contains(needs.*.result, 'failure') }}
if: ${{ always() && contains(needs.*.result, 'failure') && fromJSON(github.run_attempt) < 3}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: does GH actions not have some standard support for retries? would be nice if we didn't have to maintain our own retry logic

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some 3rd party Actions but they don't allow to restart a complete worflow. Let me know if you find something! we can always update this logic

@andreaangiolillo andreaangiolillo merged commit 97114bd into main Mar 6, 2025
11 checks passed
@andreaangiolillo andreaangiolillo deleted the CLOUDP-304706_retry branch March 6, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants